package deng.java.examples;

// http://docs.jboss.org/jbossas/jboss4guide/r4/html/aop.chapt.html

import org.jboss.aop.joinpoint.Invocation;

public class FooAspect {
	public static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FooAspect.class);
	public Object trace (Invocation invocation) throws Throwable {
		try {
			logger.info("Enter the joinpoint");
			return invocation.invokeNext ();
		} finally {
			logger.info("Leave the joinpoint");
		}
	}
}
